import demo1.Cat;
import demo1.Dog;
import demo2.Derived;
import demo4.Student;

public class Test {
    public static void main8(String[] args) {
        Student student = new Student();
        student.study();
//        student.eat();
//        student.run();
    }
    public static void main7(String[] args) {
        int a = 10;
        a = 20;
        System.out.println(a);
        System.out.println("===========");
        final int b = 10;//被final修饰的变量会变成常量，不可再修改
        //b = 20;
        System.out.println(b);
    }
    public static void main6(String[] args) {
        Derived derived = new Derived();
        System.out.println("=========");
        Derived derived1 = new Derived();
    }
    public static void main5(String[] args) {
        //Dog dog = new Dog("大黄",12);
        Dog dog = new Dog();
        dog.bark();
    }
    public static void main4(String[] args) {
        Derived derived = new Derived();
        //derived.func();
        derived.method();
    }
    public static void main3(String[] args) {
        Derived derived = new Derived();
        //derived.func();
        derived.method();
    }
    public static void main2(String[] args) {
//        Dog dog = new Dog();
//        System.out.println(dog.name);
//        System.out.println(dog.age);
//        dog.eat();
//        dog.run();
//        dog.bark();
    }
    public static void main1(String[] args) {
//        Dog dog = new Dog();
//        dog.name = "小黑";
//        dog.age = 5;
//        dog.eat();
//        dog.run();
//        dog.bark();
//        System.out.println("=============");
//        Cat cat = new Cat();
//        cat.name = "小白";
//        cat.age = 4;
//        cat.eat();
//        cat.run();
//        cat.mew();
    }
}
